package com.umeng.lx.Prensenter;

import com.example.mymvp.view.callback.BaseModelCallback;
import com.example.mymvp.view.model.BaseModel;
import com.example.mymvp.view.presenter.BasePresenter;
import com.umeng.lx.Bean.Demo;
import com.umeng.lx.Bean.DemoList;
import com.umeng.lx.Molder.MainMolder;
import com.umeng.lx.View.MainView;

import java.util.List;

public class MainPrensenter extends BasePresenter<MainView,MainMolder> implements BaseModelCallback<List<Demo.ListBean>,List<DemoList.ListDTO>>{

    public void getData(){
        getModel().getData(this,getLifecleProvider());
        getModel().getData2(this,getLifecleProvider());
    }

    @Override
    public void onSucess(List<Demo.ListBean> list) {
        getmView().showList(list);
    }

    @Override
    public void onRecsuccess(List<DemoList.ListDTO> dtoList) {
        getmView().showRec(dtoList);
    }

    @Override
    public void onError(String message, int code) {
        getmView().showError(message, code);
    }
}
